/**
 * @author wangpeizhi
 */
import request from '@/utils/request'
export function downImg(params) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sys/sysConfig/fileDownload',
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}
/**
 * 查询字典项
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'get',
    params: {
      dictCode
    }
  })
}

/**
 * 查询系统配置列表
 * @param {*} data
 */
export function sysmanageList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sys/sysConfig/newQueryPage',
    method: 'post',
    // encyType: 'aes',
    data
  })
}

/**
 * 编辑系统配置
 * @param {*} data
 */
export function updateSysconfig(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sys/sysConfig/update',
    method: 'post',
    data
  })
}

/**
 * 新增系统配置
 * @param {*} data
 */
export function insertSysconfig(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sys/sysConfig/insert',
    method: 'post',
    data
  })
}

/**
 * 删除系统配置
 * @param {*} data
 */
export function deleteSysconfig(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sys/sysConfig/delete',
    method: 'post',
    data
  })
}
/**
 * 获取系统配置
 * @param {*} data
 */
export function getSysconfig(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sys/sysConfig/newGet',
    method: 'post',
    data
  })
}
